<!DOCTYPE html>
<html lang="en">
<head>
  <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css"  crossorigin="anonymous">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>左右结构页面</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
  <style>
    body {
      margin: 0;
      padding: 0;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background-color: #f4f6f8;
    }
    .container {
      display: flex;
      height: 100vh;
    }
    .sidebar {
      width: 200px;
      background-color: #eaeaea; /* 低饱和度灰色 */
      color: #333; /* 深灰色文字 */
      padding: 20px;
      transition: background-color 0.3s ease;
    }
    .sidebar h2 {
      margin: 0 0 20px;
      font-size: 1.2em;
      text-align: center;
      color: #555; /* 深灰色标题 */
    }
    .sidebar ul {
      list-style: none;
      padding: 0;
    }
    .sidebar ul li {
      margin-bottom: 10px;
    }
    .sidebar ul li a {
      color: #333; /* 深灰色链接文字 */
      text-decoration: none;
      display: flex;
      align-items: center;
      padding: 8px 0;
      border-radius: 5px;
      transition: background-color 0.3s ease, color 0.3s ease;
    }
    .sidebar ul li a:hover {
      background-color: #dcdcdc; /* 悬停时的浅灰色 */
      color: #222; /* 悬停时的深灰色文字 */
    }
    .sidebar ul li a i {
      margin-right: 10px;
      font-size: 1.2em;
      color: #666; /* 图标的颜色 */
    }
    .sidebar ul li a.active {
      background-color: #c5d0e6; /* 选中状态的浅蓝色 */
      color: #1a1a1a; /* 选中状态的深灰色文字 */
    }
    .content {
      flex: 1;
      padding: 20px;
      background-color: #ffffff; /* 白色背景 */
      box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1); /* 左侧阴影 */
    }
    .content h2 {
      margin-top: 0;
      color: #333; /* 深灰色标题 */
    }
    .table thead {
      background-color: #f2f2f2; /* 表头的浅灰色 */
    }
    .table th, .table td {
      border-color: #ddd; /* 表格边框的浅灰色 */
    }
  </style>
</head>
<body>
<div class="container">
  <div class="sidebar" th:include="left.html">
    <h2>导航栏</h2>
    <ul>
      <li><a href="#" class="active"><i class="fas fa-user"></i> 学生</a></li>
      <li><a href="#"><i class="fas fa-chalkboard-teacher"></i> 教师</a></li>
      <li><a href="#"><i class="fas fa-book"></i> 课程</a></li>
    </ul>
  </div>
  <div class="content">
    <h2>学生信息表</h2>
    <table class="table table-striped">
      <thead>
      <tr>
        <th>id</th>
        <th>name</th>
        <th>password</th>
        <th>性别</th>
        <th>班级</th>
        <th>生日</th>
      </tr>
      </thead>
      <tbody>
      <tr th:each="student:${students}">
        <th th:text="${student.id}"></th>
        <th th:text="${student.name}"></th>
        <th th:text="${student.password}"></th>
        <th th:text="${student.sex}"></th>
        <th th:text="${student.clazz}"></th>
        <th th:text="${student.birthday}"></th>
      </tr>
      </tbody>
    </table>
  </div>
</div>
<script src="/bootstrap/js/jquery.min.js"  crossorigin="anonymous"></script>
<script src="/bootstrap/js/bootstrap.bundle.min.js"  crossorigin="anonymous"></script>
</body>
</html>